<?php
require_once "../init.php";
//$include_scripts = RES . "/js/layui/css/layui.css";
//$include_stylesheet = RES . "/js/layui/layui.js";

?>


<div class="layui-fluid layui-bg-green">
    <ul class="layui-nav layui-bg-green nav-main" lay-filter="nav-main" >
        <li class="layui-nav-item layui-this"><a href="#/"><i class="layui-icon layui-icon-fire"></i>&nbsp;浏览</a></li>
        <li class="layui-nav-item"><a href="#/planting"><i class="layui-icon layui-icon-tree"></i>&nbsp;种树</a></li>
        <li class="layui-nav-item">
            <a href="javascript:"><i class="layui-icon layui-icon-speaker"></i>&nbsp;消息</a>
            <dl class="layui-nav-child">
                <dd><a href="javascript:"><i class="layui-icon layui-icon-praise"></i>&nbsp;赞</a></dd>
                <dd><a href="javascript:"><i class="layui-icon layui-icon-dialogue"></i>&nbsp;私信</a></dd>
                <dd><a href="javascript:"><i class="layui-icon layui-icon-reply-fill"></i>&nbsp;评论</a></dd>
                <dd><a href="javascript:"><i class="layui-icon layui-icon-rate-solid"></i>&nbsp;关注</a></dd>
            </dl>
        </li>
        <li class="layui-nav-item">
            <a href="javascript:"><i class="layui-icon layui-icon-username"></i>&nbsp;我的</a>
            <dl class="layui-nav-child">
                <dd> <a href="#/signin"><i class="layui-icon layui-icon-user"></i>&nbsp;登陆</a></dd>
                <dd><a href="javascript:"><i class="layui-icon layui-icon-auz"></i>&nbsp;安全设置</a></dd>
                <dd><a href="javascript:"><i class="layui-icon layui-icon-theme"></i>&nbsp;界面偏好</a></dd>
                <dd><a href="javascript:"><i class="layui-icon layui-icon-code-circle"></i>&nbsp;参与项目</a></dd>
            </dl>
        </li>
    </ul>
</div>








<script>
    //注意：导航 依赖 element 模块，否则无法进行功能性操作
    layui.use('element', function(){
        var element = layui.element;

        element.on('nav(nav-main)', function(elem){
            console.log(elem.context.innerText); //得到当前点击的DOM对象
        });
    });


</script>